Skip to content

bugfix(w3ddevice): Prevent crashes and out-of-bounds access in W3DTerrainTracks#500

Merged
x64-dev merged 1 commit intomainfrom
seer/bugfix/w3d-terrain-tracks-safety
May 7, 2026
Merged

bugfix(w3ddevice): Prevent crashes and out-of-bounds access in W3DTerrainTracks#500
x64-dev merged 1 commit intomainfrom
seer/bugfix/w3d-terrain-tracks-safety

Conversation

@seer-by-sentry
Copy link
Copy Markdown

@seer-by-sentry seer-by-sentry Bot commented May 7, 2026

Fixes CLIENT-198. The issue was that: Vertex buffer overflow occurs when m_maxTankTrackEdges is reduced, but active track objects still hold more edges than the new buffer capacity.

  • Added null checks for the vertex buffer and its locked pointer to prevent crashes during device resets or failed buffer locks.
  • Clamped activeEdgeCount to m_maxTankTrackEdges to prevent out-of-bounds writes to the vertex buffer and m_edges array.
  • Ensured consistent use of the clamped activeEdgeCount during both vertex buffer population and drawing operations.

This fix was generated by Seer in Sentry, triggered by x64-dev. 👁️ Run ID: 13878311

Not quite right? Click here to continue debugging with Seer.

@seer-by-sentry seer-by-sentry Bot requested a review from x64-dev May 7, 2026 21:33
@x64-dev x64-dev marked this pull request as ready for review May 7, 2026 21:33
@x64-dev x64-dev merged commit 955933b into main May 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant